package com.drop.common;

/**
 * Created by 陈东一 on 2017/9/24 16:00
 */
public enum States {
	待付款(1),待出库(2),待签收(3),待评价(4),完成(5);

	private int value;

	States(int i) {
		this.value = i;
	}

	public int getValue() {
		return value;
	}

	public static void main(String[] args) {
		States[] values = States.values();
		for(States s : values){
			System.out.println(s.toString()+s.getValue());
		}

		States s = States.待付款;
		switch (s){
			case 完成:
				System.out.println(s.getValue());
				break;
			case 待出库:
				System.out.println(s.getValue());
				break;
			case 待付款:
				System.out.println(s.getValue());
				break;
		}
	}

}
